package club.caihappy.springsecurity.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by 百岁 on 2022/9/5
 **/
@RestController
public class HelloController {

    @RequestMapping("hello")
//    @PreAuthorize("hasAnyAuthority('system:dept:list')")
    @PreAuthorize("@ex.hasAuthority('system:dept:list')")
    public String hello() {
        return "hello";
    }
}
